//
//  JWGRAgreeHead.m
//  test
//
//  Created by 李彦宏 on 2018/3/14.
//  Copyright © 2018年 朱圳. All rights reserved.
//

#import "JWGRAgreeHead.h"

@implementation JWGRAgreeHead

//自定义head初始化方法
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUI];
    }
    return self;
}
//添加子控件
-(void)setUI{
    UILabel *lb1=[[UILabel alloc]initWithFrame:CGRectMake(5, 0, 85, 40)];
    lb1.text=@"2017/12/20";
    lb1.textAlignment=NSTextAlignmentCenter;
    lb1.font=[UIFont systemFontOfSize:14];
    lb1.numberOfLines=0;
    lb1.textColor=[UIColor blackColor];
    self.data=lb1;
    [self.contentView addSubview:lb1];
    
    UIButton *lb2=[[UIButton alloc]initWithFrame:CGRectMake(ScreenWidth/4+20, 8, 40, 25)];
    [lb2 setTitle:@"详情" forState:UIControlStateNormal];
    [lb2 setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
    lb2.showsTouchWhenHighlighted=YES;
    self.cont=lb2;
    [self.contentView addSubview:lb2];
    
    UILabel *lb3=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth/2+10, 8, 50, 25)];
    lb3.text=@"255";
    lb3.textAlignment=NSTextAlignmentCenter;
    lb3.font=[UIFont systemFontOfSize:14];
    lb3.textColor=[UIColor blackColor];
    self.sum=lb3;
    [self.contentView addSubview:lb3];
    
    UIButton *lb4=[[UIButton alloc]initWithFrame:CGRectMake(ScreenWidth-65, 8, 50, 25)];
    [lb4 setTitle:@"支付" forState:UIControlStateNormal];
    [lb4 setTitleColor:XGColor forState:UIControlStateNormal];
    [lb4 setBackgroundColor:dominantColor];
    lb4.showsTouchWhenHighlighted=YES;
    [lb4 addTarget:self action:@selector(lb4Action:) forControlEvents:UIControlEventTouchUpInside];
    self.IsSelet=lb4;
    [self.contentView addSubview:lb4];
    //灰线
    UILabel *lb5=[[UILabel alloc]initWithFrame:CGRectMake(0,39.5 , ScreenWidth, 0.5)];
    lb5.backgroundColor=[UIColor lightGrayColor];
    lb5.text=@"";
    [self.contentView addSubview:lb5];
    
}
-(void)lb4Action:(UIButton *)send{
        self.payBtnBlock(@"3");
}
@end
